import { Injectable } from '@angular/core';
import {Product, ProductService} from './product.service';
import {LoggerService} from './logger.service';

@Injectable()
export class AnotherProductService implements ProductService {

  public products: Product[];

  getAllProducts(): Product[] {
    return undefined;
  }

  getProduct(): Product {
    this.logger.log('从AnotherProductService 获取商品');
    return new Product(8, 'sansung', 2499, 2, '盖世手机', ['手机']);
  }

  constructor(private logger: LoggerService) {

  }
}
